package com.swe.chums.dao;

import com.swe.chums.dao.LessonsDao;
import com.swe.chums.dao.model.Lessons;
import com.swe.chums.dao.model.LessonsPk;
import com.swe.chums.dao.exceptions.LessonsDaoException;
import java.util.ArrayList;
import java.util.List;

public interface LessonsDao
{
	/**
	 * Method 'insert'
	 * 
	 * @param dto
	 * @return LessonsPk
	 */
	public LessonsPk insert(Lessons dto);

	/** 
	 * Updates a single row in the lessons table.
	 */
	public void update(LessonsPk pk, Lessons dto) throws LessonsDaoException;

	/** 
	 * Deletes a single row in the lessons table.
	 */
	public void delete(LessonsPk pk) throws LessonsDaoException;

	/** 
	 * Returns all rows from the lessons table that match the criteria 'id = :id'.
	 */
	public Lessons findByPrimaryKey(int id) throws LessonsDaoException;

	/** 
	 * Returns all rows from the lessons table that match the criteria ''.
	 */
	public List<Lessons> findAll() throws LessonsDaoException;

	/** 
	 * Returns all rows from the lessons table that match the criteria 'webresource_id = :webresourceId'.
	 */
	public List<Lessons> findByWebResource(int webresourceId) throws LessonsDaoException;

	/** 
	 * Returns all rows from the lessons table that match the criteria 'id = :id'.
	 */
	public List<Lessons> findWhereIdEquals(int id) throws LessonsDaoException;

	/** 
	 * Returns all rows from the lessons table that match the criteria 'webresource_id = :webresourceId'.
	 */
	public List<Lessons> findWhereWebresourceIdEquals(int webresourceId) throws LessonsDaoException;

	/** 
	 * Returns all rows from the lessons table that match the criteria 'title = :title'.
	 */
	public List<Lessons> findWhereTitleEquals(String title) throws LessonsDaoException;

	/** 
	 * Returns all rows from the lessons table that match the criteria 'url = :url'.
	 */
	public List<Lessons> findWhereUrlEquals(String url) throws LessonsDaoException;

	/** 
	 * Returns the rows from the lessons table that matches the specified primary-key value.
	 */
	public Lessons findByPrimaryKey(LessonsPk pk) throws LessonsDaoException;

        public List<Lessons> selectLessons(String searchText) throws LessonsDaoException;

}
